import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {
        Map<String,Integer> map = new HashMap<>();
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int c = 0;
        String[] arr = new String[n];
        for(int i = 0; i < n; i++) {
            String name = scanner.next();
            map.put(name, map.getOrDefault(name,0) + 1);
            if(map.get(name) == 2) {
                arr[c] = name;
                c++;
            }
        }
        System.out.print("[");
        if(c > 0) {
            for(int j = 0; j < c - 1; j++) {
                System.out.print(arr[j] + ",");
            }
            System.out.print(arr[c - 1]);
        }
        System.out.println("]");
    }
}
